package com.rykj.qxj.server.model.param;

import com.rykj.qxj.server.model.entity.MetadataBasic;
import com.rykj.qxj.server.model.entity.MetadataElement;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.util.List;

@ApiModel("创建表或字段参数")
public class MetadataParams {
    @NotNull
    @ApiModelProperty(value = "数据库名")
    private String  databaseName;
    @NotNull
    @ApiModelProperty(value = "数据库IP")
    private String  databaseIP;
    @Pattern(regexp = "^[0-9]*$",message = "只能数字")
    @ApiModelProperty(value = "端口")
    private String  port;
    @NotNull
    @ApiModelProperty(value = "用户名")
    private String userName;
    @NotNull
    @ApiModelProperty(value = "密码")
    private String  password;

    @ApiModelProperty(value = "数据库IP")
    private String  tableName;

    @ApiModelProperty(value = "表基本信息")
    private MetadataBasic metadataBasic;

    @ApiModelProperty(value = "字段信息")
    private List<MetadataElement> metadataElements;

    public String getDatabaseName() {
        return databaseName;
    }

    public void setDatabaseName(String databaseName) {
        this.databaseName = databaseName;
    }

    public String getDatabaseIP() {
        return databaseIP;
    }

    public void setDatabaseIP(String databaseIP) {
        this.databaseIP = databaseIP;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public MetadataBasic getMetadataBasic() {
        return metadataBasic;
    }

    public void setMetadataBasic(MetadataBasic metadataBasic) {
        this.metadataBasic = metadataBasic;
    }

    public List<MetadataElement> getMetadataElements() {
        return metadataElements;
    }

    public void setMetadataElements(List<MetadataElement> metadataElements) {
        this.metadataElements = metadataElements;
    }

    public String getPort() {
        return port;
    }

    public void setPort(String port) {
        this.port = port;
    }

    public String getTableName() {
        return tableName;
    }

    public void setTableName(String tableName) {
        this.tableName = tableName;
    }
}
